Page({
    data:{
        title:"一首歌一个故事",
        time:"2020-09-17",
        singer:"薛之谦",
        url:"http://p2.music.126.net/Abad3IaAzddLUQtGQk4izw==/109951165321788804.jpg?param=130y130",
        list:[
            {
                id:1472577555,
                videoSrc:"http://link.hhtjim.com/163/1472577555.mp3",
                songname:"守候 (2020重唱版)",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})